package day1115_2;
import javax.swing.*;
import java.awt.*;

public class W1 {
    public static void main(String[] args) {
        JFrame  win=new JFrame("斗地主");//1.窗口(容器)
        FlowLayout  flay=new FlowLayout();//4.
        JButton loginBtn=new JButton("登录");//3.按钮
        JPanel  pane=new JPanel();//2.面板
        pane.setLayout(flay);//4.
        pane.add(loginBtn);//5.
        JButton cancel=new JButton("取消");//6.
        pane.add(cancel);//7.
        win.add(pane);  //8.窗口win  添加add(面板pane)
        win.setSize(800,600);//窗口默认是隐藏的, 默认是最小状态
        win.setVisible(true);//设置窗口的可见性为true
    }


}




